
import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    TouchableHighlight,
    FlatList,
    Platform,
    Alert,
    ScrollView,
    Image
} from 'react-native';

import SquareGrid from "../components/SquareGrid";
import shareData from '../data/shareData.json';

export default class home extends Component{

    constructor(props){
        super(props);

        this.state = {};
    }

    render(){
        return (
            <ScrollView style={{flex: 1, backgroundColor: '#efeff4'}}>

                <Image source={require('../assets/images/banner.png')} style={styles.bannerStyle}/>

                <View style={styles.sgContainer}>
                    <View style={styles.sgTitleContainer}>
                        <Text style={styles.sgTitle}>主业务流程</Text>
                    </View>
                    <SquareGrid data={shareData.data}/>
                </View>
                <View style={styles.sgContainer}>
                    <View style={styles.sgTitleContainer}>
                        <Text style={styles.sgTitle}>其他应用与增值服务</Text>
                    </View>
                    <SquareGrid data={shareData.data}/>
                </View>
            </ScrollView>
        )
    }
}

const styles = StyleSheet.create({
    sgContainer: {
        backgroundColor: '#fff'
    },
    bannerStyle: {
        width: '100%',
        height: 180,
        resizeMode: 'cover'
    },
    sgTitleContainer: {
        marginTop: 10,
        marginLeft: 10,
        paddingLeft: 5,
        borderLeftColor: 'red',
        borderLeftWidth: 3
    },
    sgTitle: {
        color: '#999',
        fontSize: 12,
    }
})